/* strrchr 和 strchr 之间的区别 */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

int main(void)
{
	char *ptr = NULL;
	char str[] = "I love my home";

	ptr = strchr(str, 'o');
	if (NULL != ptr) {
		printf("strchr Offset: %ld\n", ptr - str);
	}

	ptr = strrchr(str, 'o');
	if (NULL != ptr) {
		printf("strrchr offset: %ld\n", ptr -str);
	}
	exit(0);
}
